//
//  UIWindow+Extension.m
//  maintain
//
//  Created by 郑想 on 15/10/9.
//  Copyright (c) 2015年 ewin. All rights reserved.
//

#import "UIWindow+Extension.h"
#import "YWLoginTool.h"
#import "UIColor+CustomColors.h"
#import "YWNewfeatureViewController.h"
#import "YWResourceManager.h"
#import "YWNavigationController.h"
#import "YWProfileViewController.h"

@implementation UIWindow (Extension)
- (void)switchRootViewController
{
    //    NSString *key = @"CFBundleVersion";
    //    // 上一次的使用版本（存储在沙盒中的版本号）
    //    NSString *lastVersion = [[NSUserDefaults standardUserDefaults] objectForKey:key];
    //    // 当前软件的版本号（从Info.plist中获得）
    //    NSString *currentVersion = [NSBundle mainBundle].infoDictionary[key];
    //
    //    if ([currentVersion isEqualToString:lastVersion]){
    YWProfileViewController *profileVC = [[YWProfileViewController alloc] init];
    YWNavigationController* nav = [[YWNavigationController alloc] initWithRootViewController:profileVC];
    self.rootViewController = nav;

    //    } else{
    //
    //        self.rootViewController = [[YWNewfeatureViewController alloc] init];
    //
    //        // 将当前的版本号存进沙盒
    //        [[NSUserDefaults standardUserDefaults] setObject:currentVersion forKey:key];
    //        [[NSUserDefaults standardUserDefaults] synchronize];
    //    }
}
@end
